<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>未来科技 | 粒子交互体验</title>
    <link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Montserrat:wght@300;400;600&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Montserrat', sans-serif;
            background-color: #000;
            color: #0ff;
            overflow: hidden;
            perspective: 1000px;
        }
        
        canvas {
            position: fixed;
            top: 0;
            left: 0;
            z-index: -1;
        }
        
        .container {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 1;
            padding: 2rem;
            text-align: center;
        }
        
        header {
            margin-bottom: 3rem;
            text-align: center;
        }
        
        h1 {
            font-family: 'Orbitron', sans-serif;
            font-size: 4rem;
            font-weight: 700;
            letter-spacing: 3px;
            margin-bottom: 1.5rem;
            text-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
            background: linear-gradient(to right, #0ff, #f0f);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: textGlow 2s infinite alternate;
        }
        
        .tagline {
            font-size: 1.2rem;
            max-width: 600px;
            margin: 0 auto;
            color: #ccc;
        }
        
        .features {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 2rem;
            margin: 3rem 0;
            max-width: 1200px;
        }
        
        .feature-card {
            background: rgba(10, 25, 47, 0.7);
            border-radius: 15px;
            padding: 2rem;
            width: 260px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(0, 255, 255, 0.3);
        }
        
        .feature-card:hover {
            transform: translateY(-10px) scale(1.05);
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
        }
        
        .feature-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #00f, #0ff, #f0f, #f00);
            filter: blur(5px);
        }
        
        .feature-icon {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            color: #0ff;
        }
        
        .feature-title {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.5rem;
            margin-bottom: 1rem;
            letter-spacing: 1px;
        }
        
        .cube-container {
            margin: 3rem 0;
            position: relative;
            height: 250px;
            width: 250px;
            transform-style: preserve-3d;
            animation: rotateCube 20s infinite linear;
        }
        
        .cube {
            position: relative;
            width: 100%;
            height: 100%;
            transform-style: preserve-3d;
            transform: rotateX(30deg) rotateY(45deg);
        }
        
        .face {
            position: absolute;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            border: 2px solid #0ff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            color: #0ff;
            opacity: 0.8;
            box-shadow: inset 0 0 30px rgba(0, 255, 255, 0.3);
        }
        
        .front  { transform: translateZ(125px); background: rgba(0, 0, 100, 0.6); }
        .back   { transform: rotateY(180deg) translateZ(125px); background: rgba(0, 100, 0, 0.6); }
        .right  { transform: rotateY(90deg) translateZ(125px); background: rgba(100, 0, 0, 0.6); }
        .left   { transform: rotateY(-90deg) translateZ(125px); background: rgba(100, 100, 0, 0.6); }
        .top    { transform: rotateX(90deg) translateZ(125px); background: rgba(0, 100, 100, 0.6); }
        .bottom { transform: rotateX(-90deg) translateZ(125px); background: rgba(100, 0, 100, 0.6); }
        
        footer {
            margin-top: 3rem;
            font-size: 0.9rem;
            color: #999;
        }
        
        .controls {
            margin: 2rem 0;
            display: flex;
            gap: 1rem;
        }
        
        .control-btn {
            background: rgba(0, 255, 255, 0.1);
            border: 1px solid #0ff;
            color: #0ff;
            padding: 0.8rem 2rem;
            border-radius: 30px;
            font-family: 'Orbitron', sans-serif;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .control-btn:hover {
            background: rgba(0, 255, 255, 0.3);
            box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
        }
        
        .pulse {
            position: absolute;
            width: 20px;
            height: 20px;
            background-color: rgba(0, 255, 255, 0.5);
            border-radius: 50%;
            pointer-events: none;
            box-shadow: 0 0 10px #0ff;
        }
        
        @keyframes textGlow {
            0% { text-shadow: 0 0 10px #0ff, 0 0 20px #0ff; }
            100% { text-shadow: 0 0 15px #0ff, 0 0 30px #0ff, 0 0 40px #0ff; }
        }
        
        @keyframes rotateCube {
            0% { transform: rotateX(0) rotateY(0); }
            100% { transform: rotateX(360deg) rotateY(360deg); }
        }
        
        @media (max-width: 768px) {
            h1 { font-size: 2.5rem; }
            .feature-card { width: 100%; }
            .cube-container { width: 180px; height: 180px; }
        }
    </style>
</head>
<body>
    <canvas id="particles"></canvas>
    
    <div class="container">
        <header>
            <h1>未来科技</h1>
            <p class="tagline">探索未知的界限，体验未来的无限可能</p>
        </header>
        
        <div class="controls">
            <button class="control-btn" id="theme-btn">切换主题</button>
            <button class="control-btn" id="sound-btn">音效开关</button>
            <button class="control-btn" id="pulse-btn">粒子脉冲</button>
        </div>
        
        <div class="cube-container">
            <div class="cube">
                <div class="face front">2024</div>
                <div class="face back">未来</div>
                <div class="face right">科技</div>
                <div class="face left">无限</div>
                <div class="face top">可能</div>
                <div class="face bottom">∞</div>
            </div>
        </div>
        
        <div class="features">
            <div class="feature-card">
                <div class="feature-icon">💫</div>
                <h3 class="feature-title">全息投影</h3>
                <p>利用光波重现技术创造逼真的3D视觉体验</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">🧠</div>
                <h3 class="feature-title">神经连接</h3>
                <p>将人脑与数字世界无缝对接的技术</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">⚡</div>
                <h3 class="feature-title">量子计算</h3>
                <p>超出传统计算极限的下一代处理器技术</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">🌐</div>
                <h3 class="feature-title">元宇宙入口</h3>
                <p>进入数字平行宇宙的沉浸式门户</p>
            </div>
        </div>
        
        <footer>
            <p>© 2024 未来科技 | 探索 · 创新 · 未来</p>
        </footer>
    </div>
    
    <audio id="hover-sound" preload="auto">
        <source src="data:audio/wav;base64,UklGRkQFAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YSAFAACkS9J/3oPghdN1xnCbVH8rZg5JCE4fYSp0VX9dioKVrKjErsu1z8DVzOLe7+j38fz2Av0F/gz9CP8F/QL+AvsD/AP7A/sE+QX8Bv0J/wkADAIQAxQFGQYiCCgLLw01Dz4SRxRMF00cTh1PH08eUB1PHE0ZSxcIFQIQ/gj2A+786fLi7N3n1eTR3c3bydbH1MbUydXO2tXg3+no8fH5+f/9BAIIBAwFDwURBRIFEQYQBA0BCv0F+gH2/PH77ffp9Ojx5u7k6uPp4+vl7Orw8Pb5/f8FCAwOEhQWGxkgHSMhJSQmJyYpJyooKikrLS0vLzAwMDExMjMzNDQ1Nzc3ODg5OTo6Ojs7PD09Pj4/P0BAQEFBQkJDQ0RERUVGRkdHSEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqampra2tsbGxtbW1ubm5vb29wcHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGCgoKDg4OEhISFhYWGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6Pj4+QkJCRkZGSkpKTk5OUlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJydnZ2enp6fn5+goKChoaGioqKjo6OkpKSlpaWmpqanp6eoqKipqamqqqqrq6usrKytra2urq6vr6+wsLCxsbGysrKzs7O0tLS1tbW2tra3t7e4uLi5ubm6urq7u7u8vLy9vb2+vr6/v7/AwMDBwcHCwsLDw8PExMTFxcXGxsbHx8fIyMjJycnKysrLy8vMzMzNzc3Ozs7Pz8/Q0NDR0dHS0tLT09PU1NTV1dXW1tbX19fY2NjZ2dna2trb29vc3Nzd3d3e3t7f39/g4ODh4eHi4uLj4+Pk5OTl5eXm5ubn5+fo6Ojp6enq6urr6+vs7Ozt7e3u7u7v7+/w8PDx8fHy8vLz8/P09PT19fX29vb39/f4+Pj5+fn6+vr7+/v8/Pz9/f3+/v7//////w==" type="audio/wav">
    </audio>
    
    <script>
        // 粒子背景设置
        const canvas = document.getElementById('particles');
        const ctx = canvas.getContext('2d');
        canvas.width = window.innerWidth;
        canvas.height = window.innerHeight;
        
        // 粒子类
        class Particle {
            constructor() {
                this.x = Math.random() * canvas.width;
                this.y = Math.random() * canvas.height;
                this.size = Math.random() * 5 + 1;
                this.speedX = Math.random() * 2 - 1;
                this.speedY = Math.random() * 2 - 1;
                this.color = `hsl(${Math.random() * 360}, 70%, 60%)`;
            }
            
            update() {
                this.x += this.speedX;
                this.y += this.speedY;
                
                if (this.x < 0 || this.x > canvas.width) {
                    this.speedX *= -1;
                }
                
                if (this.y < 0 || this.y > canvas.height) {
                    this.speedY *= -1;
                }
            }
            
            draw() {
                ctx.globalCompositeOperation = 'lighter';
                ctx.beginPath();
                ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
                ctx.fillStyle = this.color;
                ctx.fill();
                ctx.closePath();
                
                // 添加发光效果
                ctx.beginPath();
                ctx.arc(this.x, this.y, this.size * 3, 0, Math.PI * 2);
                const gradient = ctx.createRadialGradient(this.x, this.y, this.size, this.x, this.y, this.size * 3);
                gradient.addColorStop(0, this.color);
                gradient.addColorStop(1, 'rgba(255, 255, 255, 0)');
                ctx.fillStyle = gradient;
                ctx.fill();
                ctx.closePath();
            }
        }
        
        // 鼠标交互粒子
        class InteractiveParticle {
            constructor(x, y) {
                this.x = x;
                this.y = y;
                this.size = Math.random() * 10 + 5;
                this.color = `hsl(${Math.random() * 360}, 100%, 70%)`;
                this.alpha = 1;
                this.speedX = Math.random() * 6 - 3;
                this.speedY = Math.random() * 6 - 3;
            }
            
            update() {
                this.x += this.speedX;
                this.y += this.speedY;
                this.alpha -= 0.01;
                this.size *= 0.95;
            }
            
            draw() {
                ctx.globalAlpha = this.alpha;
                ctx.beginPath();
                ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
                ctx.fillStyle = this.color;
                ctx.fill();
                ctx.closePath();
                ctx.globalAlpha = 1;
            }
        }
        
        // 创建粒子数组
        let particles = [];
        const particleCount = Math.min(Math.floor(window.innerWidth * window.innerHeight / 1000), 200);
        for (let i = 0; i < particleCount; i++) {
            particles.push(new Particle());
        }
        
        // 交互粒子数组
        let interactiveParticles = [];
        
        // 初始化事件监听器
        function init() {
            // 窗口大小调整
            window.addEventListener('resize', () => {
                canvas.width = window.innerWidth;
                canvas.height = window.innerHeight;
            });
            
            // 鼠标移动创建交互粒子
            window.addEventListener('mousemove', (e) => {
                for (let i = 0; i < 3; i++) {
                    interactiveParticles.push(new InteractiveParticle(e.clientX, e.clientY));
                }
            });
            
            // 按钮音效
            document.querySelectorAll('.control-btn').forEach(btn => {
                btn.addEventListener('mouseenter', () => {
                    hoverSound.play();
                    btn.classList.add('active');
                    setTimeout(() => btn.classList.remove('active'), 300);
                });
            });
            
            // 主题切换按钮
            document.getElementById('theme-btn').addEventListener('click', toggleTheme);
            
            // 音效开关按钮
            document.getElementById('sound-btn').addEventListener('click', toggleSound);
            
            // 粒子脉冲按钮
            document.getElementById('pulse-btn').addEventListener('click', createPulse);
            
            // 卡片鼠标悬停效果
            document.querySelectorAll('.feature-card').forEach(card => {
                card.addEventListener('mouseenter', () => {
                    hoverSound.play();
                });
                
                card.addEventListener('mousemove', (e) => {
                    const rect = card.getBoundingClientRect();
                    const x = e.clientX - rect.left;
                    const y = e.clientY - rect.top;
                    
                    card.style.background = `radial-gradient(circle at ${x}px ${y}px, rgba(0, 150, 200, 0.6), rgba(10, 25, 47, 0.7))`;
                });
                
                card.addEventListener('mouseleave', () => {
                    card.style.background = 'rgba(10, 25, 47, 0.7)';
                });
            });
            
            // 启动动画
            animate();
        }
        
        // 主题切换
        let darkMode = true;
        function toggleTheme() {
            darkMode = !darkMode;
            document.body.style.background = darkMode ? '#000' : '#1a1a2e';
            hoverSound.play();
        }
        
        // 音效控制
        let soundEnabled = true;
        const hoverSound = document.getElementById('hover-sound');
        function toggleSound() {
            soundEnabled = !soundEnabled;
            hoverSound.volume = 0.3;
            hoverSound.play();
        }
        
        // 创建脉冲效果
        function createPulse() {
            for (let i = 0; i < 50; i++) {
                const x = Math.random() * canvas.width;
                const y = Math.random() * canvas.height;
                interactiveParticles.push(new InteractiveParticle(x, y));
            }
            hoverSound.play();
        }
        
        // 动画循环
        function animate() {
            ctx.fillStyle = darkMode ? 'rgba(0, 0, 0, 0.1)' : 'rgba(26, 26, 46, 0.1)';
            ctx.fillRect(0, 0, canvas.width, canvas.height);
            
            // 更新和绘制主粒子
            particles.forEach(particle => {
                particle.update();
                particle.draw();
            });
            
            // 更新和绘制交互粒子
            for (let i = 0; i < interactiveParticles.length; i++) {
                interactiveParticles[i].update();
                interactiveParticles[i].draw();
                
                // 移除透明度低的粒子
                if (interactiveParticles[i].alpha <= 0 || interactiveParticles[i].size <= 1) {
                    interactiveParticles.splice(i, 1);
                    i--;
                }
            }
            
            // 绘制网格
            drawGrid();
            
            requestAnimationFrame(animate);
        }
        
        // 绘制网格线
        function drawGrid() {
            ctx.strokeStyle = 'rgba(0, 255, 255, 0.05)';
            ctx.lineWidth = 1;
            
            // 垂直线
            for (let x = 0; x < canvas.width; x += 50) {
                ctx.beginPath();
                ctx.moveTo(x, 0);
                ctx.lineTo(x, canvas.height);
                ctx.stroke();
            }
            
            // 水平线
            for (let y = 0; y < canvas.height; y += 50) {
                ctx.beginPath();
                ctx.moveTo(0, y);
                ctx.lineTo(canvas.width, y);
                ctx.stroke();
            }
        }
        
        // 启动页面
        window.onload = init;
    </script>
</body>
</html>